<?php
namespace app\controller\model;

use app\BaseController;
class Task extends BaseController
{
	protected $oil_nos = ['92#','95#','98#','0#'];
    public function __construct(){
    }

	public function getTaskPrice($re=null){
		if($re==null){
			return [
				[$this->oil_nos[0],0,0,0,0,0,0,0,0]
				,[$this->oil_nos[1],0,0,0,0,0,0,0,0]
				,[$this->oil_nos[2],0,0,0,0,0,0,0,0]
				,[$this->oil_nos[3],0,0,0,0,0,0,0,0]
			];
		}else{
			if($re['ctype']==1){
				return $re['rule'];
			}
			$temArr = json_decode($re['rule'],true);
			foreach ($temArr as $k => &$v){
				$v = array_merge([$this->oil_nos[$k]],$v);
			}
			return $temArr;
		}
	}
}
?>